package com.sanploy.manage.controller;

import com.sanploy.manage.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhu yingzhi on 2017/9/26.
 * @author yingzhi zhu
 * 后台用户请求路由
 */
@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    private UserService userService;

    @GetMapping("")
    public Object getAllUserByPage(@RequestParam int currentPage, @RequestParam int pageSize){
        return userService.findAllUser(currentPage, pageSize);
    }
}
